import QtQuick 2.12
import QtQuick.Controls 2.12
import ".."

Slider {
    id: control
    background: Rectangle {
        x: control.leftPadding
        y: control.topPadding + control.availableHeight / 2 - height / 2
        implicitWidth: 200
        implicitHeight: 8
        width: control.availableWidth
        height: implicitHeight
        radius: 4
        color: "#EEEEEE"
        Rectangle {
            width: control.visualPosition * parent.width
            height: parent.height
            color: Common.colorMain
            radius: 4
        }
    }
    handle: Rectangle {
        x: control.leftPadding + control.visualPosition * (control.availableWidth - width)
        y: control.topPadding + control.availableHeight / 2 - height / 2
        width: control.height
        height: control.height
        radius: height / 2
        color: Common.colorMain
        border.color: "white"
        border.width: 3
    }
}
